﻿function SPDialog(url, height, width, title) {
    var options = SP.UI.$create_DialogOptions();
    options.url = url;
    options.height = height;
    options.width = width;
    options.AllowMaximize = true;
    options.title = title;
    options.dialogReturnValueCallback = RefreshPageFromDialog;
    SP.UI.ModalDialog.showModalDialog(options);
}

function RefreshPageFromDialog(dialogResult, returnValue) {
    SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
}